package com.psnoted.backend.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

/**
 * 统一验证请求DTO
 * 用于统一登录流程的请求参数
 * 
 * @author PSNoted Team
 * @version 1.0.0
 */
@Schema(description = "统一验证请求")
public class UnifiedVerificationRequest {

    @Schema(description = "用户名", example = "testuser", required = true)
    @NotBlank(message = "用户名不能为空")
    @Size(min = 1, max = 50, message = "用户名长度必须在1-50个字符之间")
    private String username;

    @Schema(description = "密钥哈希", example = "abc123def456...", required = true)
    @NotBlank(message = "密钥哈希不能为空")
    @Size(min = 32, max = 255, message = "密钥哈希长度必须在32-255个字符之间")
    private String keyHash;

    // 默认构造函数
    public UnifiedVerificationRequest() {}

    // 全参构造函数
    public UnifiedVerificationRequest(String username, String keyHash) {
        this.username = username;
        this.keyHash = keyHash;
    }

    // Getter和Setter方法
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getKeyHash() {
        return keyHash;
    }

    public void setKeyHash(String keyHash) {
        this.keyHash = keyHash;
    }

    @Override
    public String toString() {
        return "UnifiedVerificationRequest{" +
                "username='" + username + '\'' +
                ", keyHash='" + keyHash + '\'' +
                '}';
    }
} 